package com.yanqu.road.entity.inn;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.utils.string.StringUtils;

import java.math.BigInteger;
import java.util.Objects;

public class UserInnInfo extends DataObject {
    private long userId;

    private int dishesId;

    private int patronsId;

    private int dishesNum;        //数量

    private long cookStartTime;  //烹饪开始时间  秒

    private int hotRate = -1;   //热门菜系加成比例 默认为-1:非热门菜系

    private long lastClickMoneyTime;          // 上次点击钱箱的时间 秒

    private long lastValue;             //钱箱剩余的钱

    private long totalCookTimes;

    private long endCookExp;                   //本次烹饪获取的厨艺值  不落地

    private long endCookTime;                  //本次烹饪结束时间  不落地


    public long getLastValue() {
        return lastValue;
    }

    public void setLastValue(long lastValue) {
        if (this.lastValue != lastValue) {
            this.lastValue = lastValue;
            setUpdateOption();
        }

    }

    public long getLastClickMoneyTime() {
        return lastClickMoneyTime;
    }

    public void setLastClickMoneyTime(long lastClickMoneyTime) {
        if (!Objects.equals(this.lastClickMoneyTime, lastClickMoneyTime)) {
            this.lastClickMoneyTime = lastClickMoneyTime;
            setUpdateOption();
        }
    }


    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }

    }

    public int getDishesId() {
        return dishesId;
    }

    public void setDishesId(int dishesId) {
        if (this.dishesId != dishesId) {
            this.dishesId = dishesId;
            setUpdateOption();
        }
    }

    public int getPatronsId() {
        return patronsId;
    }

    public void setPatronsId(int patronsId) {
        if (this.patronsId != patronsId) {
            this.patronsId = patronsId;
            setUpdateOption();
        }
    }


    public int getDishesNum() {
        return dishesNum;
    }

    public void setDishesNum(int dishesNum) {
        if (this.dishesNum != dishesNum) {
            this.dishesNum = dishesNum;
            setUpdateOption();
        }

    }

    public long getCookStartTime() {
        return cookStartTime;
    }

    public void setCookStartTime(long cookStartTime) {
        if (this.cookStartTime != cookStartTime) {
            this.cookStartTime = cookStartTime;
            setUpdateOption();
        }
    }

    public long getTotalCookTimes() {
        return totalCookTimes;
    }

    public void setTotalCookTimes(long totalCookTimes) {
        if (this.totalCookTimes != totalCookTimes) {
            this.totalCookTimes = totalCookTimes;
            setUpdateOption();
        }
    }


    public int getHotRate() {
        return hotRate;
    }

    public void setHotRate(int hotRate) {
        if (this.hotRate != hotRate) {
            this.hotRate = hotRate;
        }
    }
    public long getEndCookExp() {
        return endCookExp;
    }

    public void setEndCookExp(long endCookExp) {
        this.endCookExp = endCookExp;
    }

    public long getEndCookTime() {
        return endCookTime;
    }

    public void setEndCookTime(long endCookTime) {
        this.endCookTime = endCookTime;
    }

    public boolean isHot() {
        return getHotRate() >= 0;
    }
}
